﻿using System.ComponentModel.DataAnnotations;

namespace FlyingHat.Core.Entities
{
    /// <summary>
    /// 书籍
    /// </summary>
    public class Book : ModifyEntity
    {
        /// <summary>
        /// 书名
        /// </summary>
        [Required, StringLength(50)]
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 作者
        /// </summary>
        [Required, StringLength(50)]
        public string Author { get; set; } = string.Empty;

        /// <summary>
        /// 封面
        /// </summary>
        [StringLength(500)]
        public string Cover { get; set; } = string.Empty;

        /// <summary>
        /// ISBN编号
        /// </summary>
        [StringLength(50)]
        public string ISBN { get; set; } = string.Empty;

        /// <summary>
        /// 条形码
        /// </summary>
        [StringLength(50)]
        public string BarCode { get; set; } = string.Empty;
        /// <summary>
        /// 二维码
        /// </summary>
        [StringLength(50)]
        public string QRCode { get; set; } = string.Empty;

        /// <summary>
        /// 出版社
        /// </summary>
        [StringLength(50)]
        public string Press { get; set; } = string.Empty;

        /// <summary>
        /// PDF书籍
        /// </summary>
        [StringLength(100)]
        public string Pdf { get; set; } = string.Empty;

        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsDeleted { get; set; }
    }
}
